package com.btks.mapreduce.outputformat;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @author yiwannuofulasi
 * @description Mapper阶段不做任何处理（v，NullWritable）
 * @date 2023/3/27 11:12
 * Copyright (c) 2023/3/27 by yiwannuofulasi yiwannuofulasi@163.com, by 新疆兵团勘测设计院（集团）有限公司 All Rights Reserved.
 */
public class LogMapper extends Mapper<LongWritable, Text,Text, NullWritable> {

    @Override
    protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, NullWritable>.Context context) throws IOException, InterruptedException {
        // 输入数据格式：
        // http://www.baidu.com
        // http://www.google.com
        // 输出数据格式：v,NullWritable
        // (http://www.google.com,NullWritable)
        context.write(value,NullWritable.get());
    }
}
